#ifndef TRACK
#define TRACK

#include <vector>

using namespace std;

template<typename T> 
class track {

  int id;
  vector<T> coords;

public:

  void addCoordinate(T c) {
    coords.push_back(c);
  };

  T operator[](int index) {
    return coords[index];
  }

  int size() {
    return (int) coords.size();
  };

  void clear() {
    coords.clear();
  };

  T last() {
    return coords[coords.size() - 1];
  };

  void pop_last() {
    coords.pop_back();
  };

  track() {
    this->id = -1;
  };

  track(int id) : id(-1) {
  };

  ~track() {
    coords.clear();
  };
};

#endif